package com.handsome.备忘录模式;

/**
 * @author niechun
 * @date 2023/3/25 20:40
 */
public class Originator {
    /**
     * 状态信息
     */
    private String state;

    public  Memento saveMemento(){
        return new Memento(state);
    }

    public void getMementoState(Memento memento){

        state=memento.getState();
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }
}
